package com.wx.chapter19.writer_;

import com.wx.chapter19.BufferedReader_;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;

/**
 * @Author : 佩萁
 * Description :
 * @Create : 2023/8/30 - 11:55
 */
public class BufferedWriter_ {
    public static void main(String[] args) throws IOException {
        String filePath = "e:\\ok.txt";
        BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(filePath,true));
        bufferedWriter.write("hello,  韩顺平教育!");
        bufferedWriter.newLine();//插入一个和系统相关的换行
        bufferedWriter.write("hello2,  韩顺平教育!");
        bufferedWriter.newLine();
        bufferedWriter.write("hello3,  韩顺平教育!");
        bufferedWriter.newLine();
        bufferedWriter.close();
    }
}
